#include <stdio.h>

int main() {
	float s(float x, int n);
	float x;
	int n;
	scanf("%d %f", &n, &x);
	printf("%f", s(x, n) );
}

float s(float x, int n) {
	float s = 1, a = 1;
	int i, b = 1;
	for (i = 1; i <= n; i++) {
		a = a * x;
		b = b * i;
		s = s + a / b;
	}
	return s;
}
